function CG=CellG(A,ng)
% 函数输入为A为邻接矩阵，ng为所含最少智能体个数的连通分量，如ng为2则输出含智能体个数大于等于2的连通分量；
G=graph(A);
[bin,binsize] = conncomp(G);
b=find(binsize>=ng);
[~,m]=size(b);
CG=cell(m,1);
if m>0
    for i=1:m
        [~,com]=find(bin==b(i));
        CG(i,1)={com};
    end
end
end
